// 对外配置路由
export const constantRoute = [
  //登录
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录',
      hidden: false,
    },
  },
  // 首页
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    alias: ['/home'], //路由别名
    meta: {
      hidden: true,
      title: '首页',
    },
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页一级',
          hidden: true,
          // icon: 'HomeFilled',
        },
      },
      {
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        meta: {
          title: '首页一级1.1',
          hidden: true,
          // icon: 'HomeFilled',
        },
      },
    ],
  },
  //404
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: false,
    },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'any',
    meta: {
      title: '任意路由',
      hidden: false,
    },
  },
]
// 任意路由
// export const anyRoute = {
//   path: '/:pathMatch(.*)*',
//   redirect: '/404',
//   name: 'Any',
//   meta: {
//     title: '任意路由',
//   },
// }
